/**
 * \file  generate_policy.h
 * \brief Definition of Policy inteface.
 *
 * ASO: Antiviral Sequence Optimizer
 * <http://aso.googlecode.com/>
 * Copyright (C) 2010 Velez Ezequiel, Peralta Andres, FuDePAN
 *
 * This file is part of the ASO project.
 *
 * Contents:       Header file for ASO providing interfaz GenerationPolicy.
 *
 * System:         ASO
 * Language:       C++
 *
 * Author:         Velez Ezequiel, Peralta Andres
 * E-Mail:
 *
 * ASO is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ASO is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ASO.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef POLICY_H
#define POLICY_H

#include "aso-core/common_types.h"

struct TherapyNode;

typedef TherapyNode* ChildId;

/*! Interface PolicyCallBacks */
struct GenerationPolicy
{
    enum CallbackAction //! posibles opciones sobre un hijo
    {
        ProcessChild,
        KeepAndContinueWithSibling,
        DiscardAndContinueWithSibling
    };

    //! Interface de procesamiento de child
    struct ChildProcessor
    {
        virtual Score process_node(const ChildId& id) = 0;  //! como procesar un hijo
        virtual void discard_node(const ChildId& id) = 0;   //! descartar hijo
    };

    //! función que indica que hacer luego de construir el nodo
    virtual CallbackAction node_creation_callback(const ChildId& cid, Score score) = 0;
    //! función que indica que hacer con los nodos que quedan de un nivel
    virtual void post_combinations_callback(ChildProcessor* processor) = 0;
};

#endif
